package com.guess.study.designpattern.strategy;

/**
 * Created by tianran on 2019-06-24.
 */
public class Client {

    public static void main(String[] args) {
        // 声明一个具体的策略
        Strategy strategyA = new ConcreteStrategyA();
        // 声明上下文对象
        Context contextA = new Context(strategyA);
        // 执行封装后的方法
        contextA.executeStrategy();

        Strategy strategyB = new ConcreteStrategyB();
        Context contextB = new Context(strategyB);
        contextB.executeStrategy();
    }
}
